<template>
  <div>
    <Header></Header>
    <!-- 路由组件出口 -->
    <router-view></router-view>
    <Footer v-show="$route.meta.isShow"></Footer>
    
  </div>
</template>

<script>
import Header from "./components/Header";
import Footer from "./components/Footer"

export default {
  name: "App",
  components: {
    Header,
    Footer
  },
  mounted(){
    // 将请求放在根组件，避免了重复发请求获取三级联动的数据，优化了性能
    this.$store.dispatch("getCategoryList");
  }
};
</script>

<style>
</style>
